extends InputControl

@onready var textureRect = $TextureRect
@onready var bg = $ColorRect

var config

func init(_config):
	config = _config
	var _texture = Global.createIconAtlasTexture(config.icon)
	textureRect.texture = _texture


func onMouseLeftButtonPressed():
	get_parent().onSelectItemType(self, config)


func setSelected(b):
	bg.visible = b
	

	
